<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%@include file="../common.jsp"%>
<script type="text/javascript">
$(function() {
	$('#tblRole').datagrid({
		url : rootPath + '/role/findRoleByPage',
		columns : [ [
			{field : 'id',checkbox:true}, 
			{field : 'roleCode',title : '角色编码',width : 80,align:'center'}, 
			{field : 'roleName',title : '角色名称',width : 80,align:'center'},
			{field : 'deleteFlag',title : '删除标识',width : 80,align:'center'},
			{field : 'createEmp',title : '创建人',width : 40,align:'center'}, 
			{field : 'createTime',title : '创建时间',width : 60,align:'center'},
			{field : 'updateEmp',title : '更新人',width : 40,align:'center'},
			{field : 'updateTime',title : '更新时间',width : 120,align:'center'}
		] ],
		toolbar : '#tbRole',
		pagination: true,
		fitColumns: true,
		striped: true,
		rownumbers: true,
		singleSelect: true,
		onLoadSuccess:function () {
	        $(this).datagrid("fixRownumber");

	    	showInformation('tblRole');
	    }
	});
	
});

function findRole(){
	$('#tblRole').datagrid({
		url : rootPath + "/emp/findRoleByPage",
		queryParams : serializeFormObj("formFindRole"),
	});
}
</script>
</head>
<body>
	<table id="tblRole" class="easyui-datagrid" data-options="fit:true"></table>
	<div id="tbRole">
		<div class="search-form">
			<form id="formFindRole" action="#" method="post">
				<div><input name="roleCode" class="easyui-textbox" label="角色编码："></div>
				<div><input name="roleName" class="easyui-textbox" label="角色名称："></div>
				<div class="search-btn">
					<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width:80px" onclick="findRole()" style="margin-left:5px">查询</a>
					<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:80px" onclick="javascript:$('#formFindEmp').form('reset');">重置</a>
				</div>
			</form>
		</div>
		<div class="toolBar">
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="openAddUser()">新增</a> 
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="deleteUser();">删除</a>		
		</div>
	</div>
</body>
</html>